/*
 * <h3>Title:wheel-parent系统</h3>
 * <p>Copyright (c) 2019, wnfbx@163.com. All rights reserved.</p>
 * @author wnfbx@163.com
 */
package com.wheel.autoconfigure.dynamicdatasource.loadbalancer;

import java.util.List;

/**
 * <dt>Description:DynamicDataSourceStrategy</dt>
 * <dd>数据源选择规则接口</dd>
 *
 * @author wnfbx@163.com
 * @version 1.0 <i>2019/12/16 21:02</i>
 * @since jdk1.7+
 */
public interface DataSourceLoadBalancer {
    /**
     * 最可用规则 TODO
     */
    String BEST_AVAILABLE = "BestAvailable";
    /**
     * 重试实现 TODO
     */
    String RETRY = "Retry";
    /**
     * 客户端配置 TODO
     */
    String ClientConfigEnabledRoundRobin = "ClientConfigEnabledRoundRobin";
    /**
     * 可用性过滤规则 TODO
     */
    String AVAILABILITY_FILTERING = "AvailabilityFiltering";
    /**
     * 响应时间权重规则 TODO
     */
    String WEIGTHED_RESPONSE_TIME = "WeigthedResponseTime";
    /**
     * 规避区域规则 TODO
     */
    String ZoneAvoidance = "ZoneAvoidance";

    /**
     * @param dataSourceKeys 均衡的所有数据源
     * @return 返回名称
     */
    String determine(List<String> dataSourceKeys);
}
